person = {
    "name": "Alice",
    "age": 25,
    "city": "new york"
}

# print(person)

# my_dict = {"key1":"value1","key2":"value2"}
# print(my_dict)
# my_dict = dict(key1="value1",key2="value2")
# print(my_dict)


# person = {"name": "Alice", "age": 25}
# print(person["name"])

# print(f"He is {person['name']}, and his age is {person['age']}")

# print(person.get("city","Not Found"))

person["age"]=30
person["city"]="Los Angeles"

# print(person["age"])
# print(person["city"])

# del person["age"]
# print(person.items())

# city = person.pop("city", "Not Found")
# print(person.items())

# for key in person.keys():
#     print(key)

# for value in person.values():
#       print(value)

# for key,value in person.items():
    # print(key,value)


# squares = {x: x**2 for x in range(5)}
# print(squares)

# people = {
#     "Alice":{"age":25, "city": "new york"},
#     "Bob":{"age":30, "city":"san francisco"}
# }
# print(people["Alice"]["city"])


student_score = {
    "name":{"score": 30},
    "bbbb":{"score": 40}
}

# print(student_score["bbbb"]["score"])


weather_list = {
    "Monday":"Sunday",
    "Tuesday":"Rainy"
}

weather_list["Sunday"]="Windy"
# print(weather_list)
weather_list["Monday"]="cloudy"
# print(weather_list)


# for key,value in weather_list.items():
    # print(key,value)

text = "hello world"


# str_list=list(text)
# for i in text:
#     num=str_list.count(i)
#     new_dic={i:None}
#     new_dic[i]=num
# print(new_dic)
    

# new_dict={x:str_list.count(x) for x in str_list}
# print(new_dict)

# new_dict={}
# for i in text:
#     if i in new_dict:
#         new_dict["char"]+=1
#     else
#         new_dict["char"]==1